Field of the Disclosure
Aspects of the present invention generally relate to an image coding apparatus, an image coding method, a recording medium. Further, the present invention relates to an image decoding apparatus, an image decoding method, and a recording medium. More specifically, the present invention relates to entropy coding processing and entropy decoding processing.
Description of the Related Art
H.264/MPEG-4 AVC (hereinafter, referred to as “H.264”) is a conventionally known coding method usable for compression recording of moving images (see ITU-T H.264 (March 2010) Advanced video coding for generic audio visual services).
Recent activity for a succession of H.264 includes promoting international standardization of a highly efficient coding method. Joint Collaborative Team on Video Coding (JCT-VC) has been established for ISO/IEC and ITU-T. JCT-VC plays an important role in advancing the standardization of High Efficiency Video Coding (hereinafter, referred to as “HEVC”) method (see JCT-VC (contribution) JCTVC-H1003, internet <http://phenix.int-evry.fr/jct/doc_end_user/documents/8 San%20Jose/wg11/>).
Various coding tools are widely introduced to advance the standardization of HEVC, from the viewpoint of improvement in coding efficiency as well as easiness in implementation or reduction of processing time. For example, using a multi-core CPU is useful in reducing the processing time because it can enhance the parallelism of the processing. One of such methods is a “wavefront” method characterized by parallel processing of the context-based adaptive binary arithmetic coding (hereinafter, referred to as “CABAC”) processing (CT-VC (contribution) JCTVC-F274 doc, internet <http://phenix.int-evry.fr/jct/doc_end_user/documents/6_Torino/wg11/>).
According to CABAC, the parameter to be referred to in performing arithmetic coding is a context parameter. The context parameter represents an occurrence probability of binary data corresponding to a coding target syntax element (e.g., conversion factor or header information) and is a value of a symbol (0 or 1) having a higher occurrence probability. The context parameter is updated each time the symbol is coded or decoded. Therefore, there is a dependence relationship between blocks with respect to the context parameter. For example, when an image processing apparatus performs parallel processing for each block line having a height comparable to one block, it is necessary to initialize the context parameter before starting coding processing for a block positioned on the left side of a picture. However, performing the above-mentioned initialization of the context parameter is disadvantageous in that the coding efficiency deteriorates significantly.
On the other hand, according to the wavefront method, at the time when coding processing for a predetermined number of blocks designated beforehand has been completed, the context parameter is referred to in processing a block positioned on the left side of the next block line. Thus, it is feasible to perform the parallel processing while suppressing reduction in the coding efficiency. FIG. 14 illustrates a picture that is divided into a plurality of blocks. In FIG. 14, sixty-four blocks (0,0) to (63,0) are arrayed in the horizontal direction to cooperatively constitute one block line. Similarly, sixty-four blocks (0,1) to (63,1) cooperatively constitute a block line. Sixty-four blocks (0,2) to (63,2) cooperatively constitute a block line. The coding processing includes performing parallel processing for each of the above-mentioned block lines. The coding processing further includes coding the block (2,0) and the block (0,1) referring to the context parameter at the completion timing of the processing performed for the block (1,0), and updating each context parameter independently. Similarly, the coding processing includes coding the block (2,1) and the block (0,2) referring to the context parameter at the completion timing of the processing performed for the block (1,1), and updating each context parameter independently. The above-mentioned procedure for the coding processing is similarly applicable to decoding processing.
FIG. 15 is a block diagram illustrating a conventional image coding apparatus that can perform a coding operation according to the wavefront method. An image inputting unit 500 divides an input picture into three block lines, which are input in parallel to predictive coding units 510 to 512, respectively. Each of the predictive coding units 510 to 512 performs inter-frame prediction processing or intra-frame prediction processing on the input image. The predictive coding units 510 to 512 derive differential data representing differences between the predicted image and the input image, and perform conversion and quantization processing on the differential data to output conversion factors. Further, each predictive coding unit outputs header information (e.g., prediction mode). Entropy coding units 520 to 522 arithmetically encode the conversion factors and the header information with reference to context parameters stored in context memories 550 to 552. Each arithmetically coded data is output via a code outputting unit 530 to an external device. Further, the entropy coding units 520 to 522 update the context parameters stored in the context memories 550 to 552 according to the obtained coding result.
An operation for updating context memories, which can be performed by the image coding apparatus when the image coding apparatus encodes the picture illustrated in FIG. 14, is described in detail below with reference to timing charts illustrated in FIGS. 16A and 16B. First, at time t0 illustrated in FIG. 16A, the image coding apparatus initializes the context memory 550. The entropy coding unit 520 encodes two blocks (0,0) and (1,0) while referring to and updating the context parameter stored in the context memory 550. At time t3, that is, when the processing for the block (1,0) has been completed, the image coding apparatus copies the context parameter from the context memory 550 to the context memory 551. The entropy coding unit 521 arithmetically encodes two blocks (0,1) and (1,1) while referring to and updating the context parameter stored in the context memory 551. At time t6, the image coding apparatus copies the context parameter from the context memory 551 to the context memory 552. The entropy coding unit 522 encodes two blocks (0,2) and (1,2) in parallel.
After completing the coding processing for the block (1,2), that is, at time t9, a context control unit 540 copies the context parameter from the context memory 552 to a shared context memory 560 to start coding processing for the block (0,3). At time t66, the context control unit 540 copies the context parameter from the shared context memory 560 to the context memory 550. Similarly, at times t69, t72, and t75, the context control unit 540 performs processing for copying the context parameter from the context memory 550 to the context memory 551, from the context memory 551 to the context memory 552, and from the context memory 552 to the shared context memory 560, respectively.
As described with reference to FIGS. 16A and 16B, according to the wavefront method, the image coding apparatus performs the processing for copying the context parameter from a memory to another memory two times for each block line. The first copy processing includes reading a context parameter from a context memory corresponding to the upper block line before starting the processing for the block line. The second copy processing includes writing a context parameter into a context memory corresponding to the lower block line at completion timing of processing performed for two blocks. The coding processing stops during the context parameter copy processing. Therefore, performances in the coding processing deteriorate significantly.